package a_exception.b_check;

import javax.imageio.ImageIO;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.text.SimpleDateFormat;

//异常分类
public class CheckExceptionDemo {
    public static void main(String[] args) throws UnsupportedEncodingException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        try {
            sdf.parse("2024/07-28");
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }

        try {
            ImageIO.read(CheckExceptionDemo.class.getResourceAsStream("a.jpg"));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }

        String s = new String(new byte[10],"GBK");

    }
}













